home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / info / xemacs.info-3.z / xemacs.info-3
Encoding:
GNU Info File  |  1998-05-21  |  49.4 KB  |  1,211 lines

  1. This is Info file ../../info/xemacs.info, produced by Makeinfo version
  2. 1.68 from the input file xemacs.texi.
  3.  
  4.    This file documents the XEmacs editor.
  5.  
  6.    Copyright (C) 1985, 1986, 1988 Richard M. Stallman.  Copyright (C)
  7. 1991, 1992, 1993, 1994 Lucid, Inc.  Copyright (C) 1993, 1994 Sun
  8. Microsystems, Inc.  Copyright (C) 1995 Amdahl Corporation.
  9.  
  10.    Permission is granted to make and distribute verbatim copies of this
  11. manual provided the copyright notice and this permission notice are
  12. preserved on all copies.
  13.  
  14.    Permission is granted to copy and distribute modified versions of
  15. this manual under the conditions for verbatim copying, provided also
  16. that the sections entitled "The GNU Manifesto", "Distribution" and "GNU
  17. General Public License" are included exactly as in the original, and
  18. provided that the entire resulting derived work is distributed under the
  19. terms of a permission notice identical to this one.
  20.  
  21.    Permission is granted to copy and distribute translations of this
  22. manual into another language, under the above conditions for modified
  23. versions, except that the sections entitled "The GNU Manifesto",
  24. "Distribution" and "GNU General Public License" may be included in a
  25. translation approved by the author instead of in the original English.
  26.  
  27. 
  28. File: xemacs.info,  Node: Exiting,  Next: Command Switches,  Prev: Entering Emacs,  Up: Top
  29.  
  30. Exiting Emacs
  31. =============
  32.  
  33.    There are two commands for exiting Emacs because there are two kinds
  34. of exiting: "suspending" Emacs and "killing" Emacs.  "Suspending" means
  35. stopping Emacs temporarily and returning control to its superior
  36. (usually the shell), allowing you to resume editing later in the same
  37. Emacs job, with the same files, same kill ring, same undo history, and
  38. so on.  This is the usual way to exit.  "Killing" Emacs means
  39. destroying the Emacs job.  You can run Emacs again later, but you will
  40. get a fresh Emacs; there is no way to resume the same editing session
  41. after it has been killed.
  42.  
  43. `C-z'
  44.      Suspend Emacs (`suspend-emacs').  If used under the X window
  45.      system, shrink the X window containing the Emacs frame to an icon
  46.      (see below).
  47.  
  48. `C-x C-c'
  49.      Kill Emacs (`save-buffers-kill-emacs').
  50.  
  51.    If you use XEmacs under the X window system, `C-z' shrinks the X
  52. window containing the Emacs frame to an icon.  The Emacs process is
  53. stopped temporarily, and control is returned to the window manager.  If
  54. more than one frame is associated with the Emacs process, only the
  55. frame from which you used `C-z' is retained.  The X windows containing
  56. the other Emacs frames are closed.
  57.  
  58.    To activate the "suspended" Emacs, use the appropriate window manager
  59. mouse gestures.  Usually left-clicking on the icon reactivates and
  60. reopens the X window containing the Emacs frame, but the window manager
  61. you use determines what exactly happens.  To actually kill the Emacs
  62. process, use `C-x C-c' or the Exit Emacs item on the File menu.
  63.  
  64.    On systems that do not permit programs to be suspended, `C-z' runs
  65. an inferior shell that communicates directly with the terminal, and
  66. Emacs waits until you exit the subshell.  On these systems, the only way
  67. to return to the shell from which Emacs was started (to log out, for
  68. example) is to kill Emacs.  `C-d' or `exit' are typical commands to
  69. exit a subshell.
  70.  
  71.    To kill Emacs, type `C-x C-c' (`save-buffers-kill-emacs').  A
  72. two-character key is used for this to make it harder to type.  In
  73. XEmacs, selecting the Exit Emacs option of the File menu is an
  74. alternate way of issuing the command.
  75.  
  76.    Unless a numeric argument is used, this command first offers to save
  77. any modified buffers.  If you do not save all buffers, you are asked for
  78. reconfirmation with `yes' before killing Emacs, since any changes not
  79. saved will be lost.  If any subprocesses are still running, `C-x C-c'
  80. asks you to confirm killing them, since killing Emacs kills the
  81. subprocesses simultaneously.
  82.  
  83.    In most programs running on Unix, certain characters may instantly
  84. suspend or kill the program.  (In Berkeley Unix these characters are
  85. normally `C-z' and `C-c'.)  This Unix feature is turned off while you
  86. are in Emacs. The meanings of `C-z' and `C-x C-c' as keys in Emacs were
  87. inspired by the standard Berkeley Unix meanings of `C-z' and `C-c', but
  88. that is their only relationship with Unix.  You could customize these
  89. keys to do anything (*note Keymaps::.).
  90.  
  91. 
  92. File: xemacs.info,  Node: Command Switches,  Next: Basic,  Prev: Exiting,  Up: Top
  93.  
  94. Command Line Switches and Arguments
  95. ===================================
  96.  
  97.    XEmacs supports command line arguments you can use to request
  98. various actions when invoking Emacs.  The commands are for compatibility
  99. with other editors and for sophisticated activities.  If you are using
  100. XEmacs under the X window system, you can also use a number of standard
  101. Xt command line arguments. Command line arguments are not usually
  102. needed for editing with Emacs; new users can skip this section.
  103.  
  104.    Many editors are designed to be started afresh each time you want to
  105. edit.  You start the editor to edit one file; then exit the editor.  The
  106. next time you want to edit either another file or the same one, you
  107. start the editor again.  Under these circumstances, it makes sense to
  108. use a command line argument to say which file to edit.
  109.  
  110.    The recommended way to use XEmacs is to start it only once, just
  111. after you log in, and do all your editing in the same Emacs process.
  112. Each time you want to edit a file, you visit it using the existing
  113. Emacs.  Emacs creates a new buffer for each file, and (unless you kill
  114. some of the buffers) Emacs eventually has many files in it ready for
  115. editing.  Usually you do not kill the Emacs process until you are about
  116. to log out.  Since you usually read files by typing commands to Emacs,
  117. command line arguments for specifying a file when Emacs is started are
  118. seldom needed.
  119.  
  120.    Emacs accepts command-line arguments that specify files to visit,
  121. functions to call, and other activities and operating modes.  If you are
  122. running XEmacs under the X window system, a number of standard Xt
  123. command line arguments are available as well.
  124.  
  125.    The following subsections list:
  126.    * Command line arguments that you can always use
  127.  
  128.    * Command line arguments that have to appear at the beginning of the
  129.      argument list
  130.  
  131.    * Command line arguments that are only relevant if you are running
  132.      XEmacs under X
  133.  
  134. Command Line Arguments for Any Position
  135. ---------------------------------------
  136.  
  137.    Command line arguments are processed in the order they appear on the
  138. command line; however, certain arguments (the ones in the second table)
  139. must be at the front of the list if they are used.
  140.  
  141.    Here are the arguments allowed:
  142.  
  143. `FILE'
  144.      Visit FILE using `find-file'.  *Note Visiting::.
  145.  
  146. `+LINENUM FILE'
  147.      Visit FILE using `find-file', then go to line number LINENUM in it.
  148.  
  149. `-load FILE'
  150. `-l FILE'
  151.      Load a file FILE of Lisp code with the function `load'.  *Note
  152.      Lisp Libraries::.
  153.  
  154. `-funcall FUNCTION'
  155. `-f FUNCTION'
  156.      Call Lisp function FUNCTION with no arguments.
  157.  
  158. `-eval FUNCTION'
  159.      Interpret the next argument as a Lisp expression, and evaluate it.
  160.      You must be very careful of the shell quoting here.
  161.  
  162. `-insert FILE'
  163. `-i FILE'
  164.      Insert the contents of FILE into the current buffer.  This is like
  165.      what `M-x insert-buffer' does; *Note Misc File Ops::.
  166.  
  167. `-kill'
  168.      Exit from Emacs without asking for confirmation.
  169.  
  170. `-version'
  171.      Prints version information.  This implies `-batch'.
  172.  
  173.           % xemacs -version
  174.           XEmacs 19.13 of Mon Aug 21 1995 on willow (usg-unix-v) [formerly Lucid Emacs]
  175.  
  176. `-help'
  177.      Prints a summary of command-line options and then exits.
  178.  
  179. Command Line Arguments (Beginning of Line Only)
  180. -----------------------------------------------
  181.  
  182.    The following arguments are recognized only at the beginning of the
  183. command line.  If more than one of them appears, they must appear in the
  184. order in which they appear in this table.
  185.  
  186. `-t FILE'
  187.      Use FILE instead of the terminal for input and output.  This
  188.      implies the `-nw' option, documented below.
  189.  
  190. `-batch'
  191.      Run Emacs in "batch mode", which means that the text being edited
  192.      is not displayed and the standard Unix interrupt characters such as
  193.      `C-z' and `C-c' continue to have their normal effect.  Emacs in
  194.      batch mode outputs to `stderr' only what would normally be printed
  195.      in the echo area under program control.
  196.  
  197.      Batch mode is used for running programs written in Emacs Lisp from
  198.      shell scripts, makefiles, and so on.  Normally the `-l' switch or
  199.      `-f' switch will be used as well, to invoke a Lisp program to do
  200.      the batch processing.
  201.  
  202.      `-batch' implies `-q' (do not load an init file).  It also causes
  203.      Emacs to kill itself after all command switches have been
  204.      processed.  In addition, auto-saving is not done except in buffers
  205.      for which it has been explicitly requested.
  206.  
  207. `-nw'
  208.      Start up XEmacs in TTY mode (using the TTY XEmacs was started
  209.      from), rather than trying to connect to an X display.  Note that
  210.      this happens automatically if the `DISPLAY' environment variable
  211.      is not set.
  212.  
  213. `-debug-init'
  214.      Enter the debugger if an error in the init file occurs.
  215.  
  216. `-unmapped'
  217.      Do not map the initial frame.  This is useful if you want to start
  218.      up XEmacs as a server (e.g. for gnuserv screens or external client
  219.      widgets).
  220.  
  221. `-no-init-file'
  222. `-q'
  223.      Do not load your Emacs init file `~/.emacs'.
  224.  
  225. `-no-site-file'
  226.      Do not load the site-specific init file `lisp/site-start.el'.
  227.  
  228. `-user USER'
  229. `-u USER'
  230.      Load USER's Emacs init file `~USER/.emacs' instead of your own.
  231.  
  232.    Note that the init file can get access to the command line argument
  233. values as the elements of a list in the variable `command-line-args'.
  234. (The arguments in the second table above will already have been
  235. processed and will not be in the list.)  The init file can override the
  236. normal processing of the other arguments by setting this variable.
  237.  
  238.    One way to use command switches is to visit many files automatically:
  239.  
  240.      xemacs *.c
  241.  
  242. passes each `.c' file as a separate argument to Emacs, so that Emacs
  243. visits each file (*note Visiting::.).
  244.  
  245.    Here is an advanced example that assumes you have a Lisp program file
  246. called `hack-c-program.el' which, when loaded, performs some useful
  247. operation on the current buffer, expected to be a C program.
  248.  
  249.      xemacs -batch foo.c -l hack-c-program -f save-buffer -kill > log
  250.  
  251. Here Emacs is told to visit `foo.c', load `hack-c-program.el' (which
  252. makes changes in the visited file), save `foo.c' (note that
  253. `save-buffer' is the function that `C-x C-s' is bound to), and then
  254. exit to the shell from which the command was executed.  `-batch'
  255. guarantees there will be no problem redirecting output to `log',
  256. because Emacs will not assume that it has a display terminal to work
  257. with.
  258.  
  259. Command Line Arguments (for XEmacs Under X)
  260. -------------------------------------------
  261.  
  262.    If you are running XEmacs under X, a number of options are available
  263. to control color, border, and window title and icon name:
  264.  
  265. `-title TITLE'
  266. `-wn TITLE'
  267. `-T TITLE'
  268.      Use TITLE as the window title. This sets the `frame-title-format'
  269.      variable, which controls the title of the X window corresponding
  270.      to the selected frame.  This is the same format as
  271.      `mode-line-format'.
  272.  
  273. `-iconname TITLE'
  274. `-in TITLE'
  275.      Use TITLE as the icon name. This sets the
  276.      `frame-icon-title-format' variable, which controls the title of
  277.      the icon corresponding to the selected frame.
  278.  
  279. `-mc COLOR'
  280.      Use COLOR as the mouse color.
  281.  
  282. `-cr COLOR'
  283.      Use COLOR as the text-cursor foreground color.
  284.  
  285.    In addition, XEmacs allows you to use a number of standard Xt
  286. command line arguments.
  287.  
  288. `-background COLOR'
  289. `-bg COLOR'
  290.      Use COLOR as the background color.
  291.  
  292. `-bordercolor COLOR'
  293. `-bd COLOR'
  294.      Use COLOR as the border color.
  295.  
  296. `-borderwidth WIDTH'
  297. `-bw WIDTH'
  298.      Use WIDTH as the border width.
  299.  
  300. `-display DISPLAY'
  301. `-d DISPLAY'
  302.      When running under the X window system, create the window
  303.      containing the Emacs frame on the display named DISPLAY.
  304.  
  305. `-foreground COLOR'
  306. `-fg COLOR'
  307.      Use COLOR as the foreground color.
  308.  
  309. `-font NAME'
  310. `-fn NAME'
  311.      Use NAME as the default font.
  312.  
  313. `-geometry SPEC'
  314. `-geom SPEC'
  315. `-g SPEC'
  316.      Use the geometry (window size and/or position) specified by SPEC.
  317.  
  318. `-iconic'
  319.      Start up iconified.
  320.  
  321. `-rv'
  322.      Bring up Emacs in reverse video.
  323.  
  324. `-name NAME'
  325.      Use the resource manager resources specified by NAME.  The default
  326.      is to use the name of the program (`argv[0]') as the resource
  327.      manager name.
  328.  
  329. `-xrm'
  330.      Read something into the resource database for this invocation of
  331.      Emacs only.
  332.  
  333. 
  334. File: xemacs.info,  Node: Basic,  Next: Undo,  Prev: Command Switches,  Up: Top
  335.  
  336. Basic Editing Commands
  337. **********************
  338.  
  339.    We now give the basics of how to enter text, make corrections, and
  340. save the text in a file.  If this material is new to you, you might
  341. learn it more easily by running the Emacs learn-by-doing tutorial.  To
  342. do this, type `Control-h t' (`help-with-tutorial').
  343.  
  344. Inserting Text
  345. ==============
  346.  
  347.    To insert printing characters into the text you are editing, just
  348. type them.  This inserts the characters into the buffer at the cursor
  349. (that is, at "point"; *note Point::.).  The cursor moves forward.  Any
  350. characters after the cursor move forward too.  If the text in the buffer
  351. is `FOOBAR', with the cursor before the `B', and you type `XX', the
  352. result is `FOOXXBAR', with the cursor still before the `B'.
  353.  
  354.    To "delete" text you have just inserted, use <DEL>.  <DEL> deletes
  355. the character BEFORE the cursor (not the one that the cursor is on top
  356. of or under; that is the character AFTER the cursor).  The cursor and
  357. all characters after it move backwards.  Therefore, if you type a
  358. printing character and then type <DEL>, they cancel out.
  359.  
  360.    To end a line and start typing a new one, type <RET>.  This inserts
  361. a newline character in the buffer.  If point is in the middle of a
  362. line, <RET> splits the line.  Typing <DEL> when the cursor is at the
  363. beginning of a line rubs out the newline before the line, thus joining
  364. the line with the preceding line.
  365.  
  366.    Emacs automatically splits lines when they become too long, if you
  367. turn on a special mode called "Auto Fill" mode.  *Note Filling::, for
  368. information on using Auto Fill mode.
  369.  
  370.    Customization information: <DEL>, in most modes, runs the command
  371. `delete-backward-char'; <RET> runs the command `newline', and
  372. self-inserting printing characters run the command `self-insert', which
  373. inserts whatever character was typed to invoke it.  Some major modes
  374. rebind <DEL> to other commands.
  375.  
  376.    Direct insertion works for printing characters and <SPC>, but other
  377. characters act as editing commands and do not insert themselves.  If
  378. you need to insert a control character or a character whose code is
  379. above 200 octal, you must "quote" it by typing the character
  380. `control-q' (`quoted-insert') first.  There are two ways to use `C-q':
  381.  
  382.    * `Control-q' followed by any non-graphic character (even `C-g')
  383.      inserts that character.
  384.  
  385.    * `Control-q' followed by three octal digits inserts the character
  386.      with the specified character code.
  387.  
  388. A numeric argument to `C-q' specifies how many copies of the quoted
  389. character should be inserted (*note Arguments::.).
  390.  
  391.    If you prefer to have text characters replace (overwrite) existing
  392. text instead of moving it to the right, you can enable Overwrite mode, a
  393. minor mode.  *Note Minor Modes::.
  394.  
  395. Changing the Location of Point
  396. ==============================
  397.  
  398.    To do more than insert characters, you have to know how to move point
  399. (*note Point::.).  Here are a few of the available commands.
  400.  
  401.    NOTE: Many of the following commands have two versions, one that uses
  402. the function keys (e.g. <LEFT> or <END>) and one that doesn't.  The
  403. former versions may only be available on X terminals (i.e. not on
  404. TTY's), but the latter are available on all terminals.
  405.  
  406. `C-a'
  407. `HOME'
  408.      Move to the beginning of the line (`beginning-of-line').
  409.  
  410. `C-e'
  411. `END'
  412.      Move to the end of the line (`end-of-line').
  413.  
  414. `C-f'
  415. `RIGHT'
  416.      Move forward one character (`forward-char').
  417.  
  418. `C-b'
  419. `LEFT'
  420.      Move backward one character (`backward-char').
  421.  
  422. `M-f'
  423. `C-RIGHT'
  424.      Move forward one word (`forward-word').
  425.  
  426. `M-b'
  427. `C-LEFT'
  428.      Move backward one word (`backward-word').
  429.  
  430. `C-n'
  431. `DOWN'
  432.      Move down one line, vertically (`next-line').  This command
  433.      attempts to keep the horizontal position unchanged, so if you
  434.      start in the middle of one line, you end in the middle of the
  435.      next.  When on the last line of text, `C-n' creates a new line and
  436.      moves onto it.
  437.  
  438. `C-p'
  439. `UP'
  440.      Move up one line, vertically (`previous-line').
  441.  
  442. `C-v'
  443. `PGDN'
  444.      Move down one page, vertically (`scroll-up').
  445.  
  446. `M-v'
  447. `PGUP'
  448.      Move up one page, vertically (`scroll-down').
  449.  
  450. `C-l'
  451.      Clear the frame and reprint everything (`recenter').  Text moves
  452.      on the frame to bring point to the center of the window.
  453.  
  454. `M-r'
  455.      Move point to left margin on the line halfway down the frame or
  456.      window (`move-to-window-line').  Text does not move on the frame.
  457.      A numeric argument says how many screen lines down from the top of
  458.      the window (zero for the top).  A negative argument counts from
  459.      the bottom (-1 for the bottom).
  460.  
  461. `C-t'
  462.      Transpose two characters, the ones before and after the cursor
  463.      (`transpose-chars').
  464.  
  465. `M-<'
  466. `C-HOME'
  467.      Move to the top of the buffer (`beginning-of-buffer').  With
  468.      numeric argument N, move to N/10 of the way from the top.  *Note
  469.      Arguments::, for more information on numeric arguments.
  470.  
  471. `M->'
  472. `C-END'
  473.      Move to the end of the buffer (`end-of-buffer').
  474.  
  475. `M-x goto-char'
  476.      Read a number N and move the cursor to character number N.
  477.      Position 1 is the beginning of the buffer.
  478.  
  479. `M-g'
  480.      Read a number N and move cursor to line number N (`goto-line').
  481.      Line 1 is the beginning of the buffer.
  482.  
  483. `C-x C-n'
  484.      Use the current column of point as the "semi-permanent goal
  485.      column" for `C-n' and `C-p' (`set-goal-column').  Henceforth, those
  486.      commands always move to this column in each line moved into, or as
  487.      close as possible given the contents of the line.  This goal
  488.      column remains in effect until canceled.
  489.  
  490. `C-u C-x C-n'
  491.      Cancel the goal column.  Henceforth, `C-n' and `C-p' once again
  492.      try to avoid changing the horizontal position, as usual.
  493.  
  494.    If you set the variable `track-eol' to a non-`nil' value, `C-n' and
  495. `C-p' move to the end of the line when at the end of the starting line.
  496. By default, `track-eol' is `nil'.
  497.  
  498. Erasing Text
  499. ============
  500.  
  501. `<DEL>'
  502.      Delete the character before the cursor (`delete-backward-char').
  503.  
  504. `C-d'
  505.      Delete the character after the cursor (`delete-char').
  506.  
  507. `C-k'
  508.      Kill to the end of the line (`kill-line').
  509.  
  510. `M-d'
  511.      Kill forward to the end of the next word (`kill-word').
  512.  
  513. `M-<DEL>'
  514.      Kill back to the beginning of the previous word
  515.      (`backward-kill-word').
  516.  
  517.    In contrast to the <DEL> key, which deletes the character before the
  518. cursor, `Control-d' deletes the character after the cursor, causing the
  519. rest of the text on the line to shift left.  If `Control-d' is typed at
  520. the end of a line, that line and the next line are joined.
  521.  
  522.    To erase a larger amount of text, use `Control-k', which kills a
  523. line at a time.  If you use `C-k' at the beginning or in the middle of
  524. a line, it kills all the text up to the end of the line.  If you use
  525. `C-k' at the end of a line, it joins that line and the next line.
  526.  
  527.    *Note Killing::, for more flexible ways of killing text.
  528.  
  529. Files
  530. =====
  531.  
  532.    The commands above are sufficient for creating and altering text in
  533. an Emacs buffer.  More advanced Emacs commands just make things easier.
  534. But to keep any text permanently you must put it in a "file".  Files
  535. are named units of text which are stored by the operating system and
  536. which you can retrieve by name.  To look at or use the contents of a
  537. file in any way, including editing the file with Emacs, you must
  538. specify the file name.
  539.  
  540.    Consider a file named `/usr/rms/foo.c'.  To begin editing this file
  541. from Emacs, type:
  542.  
  543.      C-x C-f /usr/rms/foo.c <RET>
  544.  
  545. The file name is given as an "argument" to the command `C-x C-f'
  546. (`find-file').  The command uses the "minibuffer" to read the argument.
  547. You have to type <RET> to terminate the argument (*note Minibuffer::.).
  548.  
  549.    You can also use the Open... menu item from the File menu, then type
  550. the name of the file to the prompt.
  551.  
  552.    Emacs obeys the command by "visiting" the file: it creates a buffer,
  553. copies the contents of the file into the buffer, and then displays the
  554. buffer for you to edit.  You can make changes in the buffer, and then
  555. "save" the file by typing `C-x C-s' (`save-buffer') or choosing Save
  556. Buffer from the File menu.  This makes the changes permanent by copying
  557. the altered contents of the buffer back into the file `/usr/rms/foo.c'.
  558. Until then, the changes are only inside your Emacs buffer, and the
  559. file `foo.c' is not changed.
  560.  
  561.    To create a file, visit the file with `C-x C-f' as if it already
  562. existed or choose Open... from the File menu and provide the name for
  563. the new file in the minibuffer.  Emacs will create an empty buffer in
  564. which you can insert the text you want to put in the file.  When you
  565. save the buffer with `C-x C-s', or by choosing Save Buffer from the
  566. File menu, the file is created.
  567.  
  568.    To learn more about using files, *note Files::..
  569.  
  570. Help
  571. ====
  572.  
  573.    If you forget what a key does, you can use the Help character
  574. (`C-h') to find out: Type `C-h k' followed by the key you want to know
  575. about.  For example, `C-h k C-n' tells you what `C-n' does.  `C-h' is a
  576. prefix key; `C-h k' is just one of its subcommands (the command
  577. `describe-key').  The other subcommands of `C-h' provide different
  578. kinds of help.  Type `C-h' three times to get a description of all the
  579. help facilities.  *Note Help::.
  580.  
  581. * Menu:
  582.  
  583. * Blank Lines::        Commands to make or delete blank lines.
  584. * Continuation Lines:: Lines too wide for the frame.
  585. * Position Info::      What page, line, row, or column is point on?
  586. * Arguments::           Numeric arguments for repeating a command.
  587.  
  588. 
  589. File: xemacs.info,  Node: Blank Lines,  Next: Continuation Lines,  Prev: Basic,  Up: Basic
  590.  
  591. Blank Lines
  592. ===========
  593.  
  594.    Here are special commands and techniques for entering and removing
  595. blank lines.
  596.  
  597. `C-o'
  598.      Insert one or more blank lines after the cursor (`open-line').
  599.  
  600. `C-x C-o'
  601.      Delete all but one of many consecutive blank lines
  602.      (`delete-blank-lines').
  603.  
  604.    When you want to insert a new line of text before an existing line,
  605. you just type the new line of text, followed by <RET>.  If you prefer
  606. to create a blank line first and then insert the desired text, use the
  607. key `C-o' (`open-line'), which inserts a newline after point but leaves
  608. point in front of the newline.  Then type the text into the new line.
  609. `C-o F O O' has the same effect as `F O O <RET>', except for the final
  610. location of point.
  611.  
  612.    To create several blank lines, type `C-o' several times, or give
  613. `C-o' an argument indicating how many blank lines to create.  *Note
  614. Arguments::, for more information.
  615.  
  616.    If you have many blank lines in a row and want to get rid of them,
  617. use `C-x C-o' (`delete-blank-lines').  If point is on a blank line
  618. which is adjacent to at least one other blank line, `C-x C-o' deletes
  619. all but one of the blank lines.  If point is on a blank line with no
  620. other adjacent blank line, the sole blank line is deleted.  If point is
  621. on a non-blank line, `C-x C-o' deletes any blank lines following that
  622. non-blank line.
  623.  
  624. 
  625. File: xemacs.info,  Node: Continuation Lines,  Next: Position Info,  Prev: Blank Lines,  Up: Basic
  626.  
  627. Continuation Lines
  628. ==================
  629.  
  630.    If you add too many characters to one line without breaking with a
  631. <RET>, the line grows to occupy two (or more) screen lines, with a
  632. curved arrow at the extreme right margin of all but the last line.  The
  633. curved arrow indicates that the following screen line is not really a
  634. distinct line in the text, but just the "continuation" of a line too
  635. long to fit the frame.  You can use Auto Fill mode (*note Filling::.)
  636. to have Emacs insert newlines automatically when a line gets too long.
  637.  
  638.    Instead of continuation, long lines can be displayed by "truncation".
  639. This means that all the characters that do not fit in the width of the
  640. frame or window do not appear at all.  They remain in the buffer,
  641. temporarily invisible.  Three diagonal dots in the last column (instead
  642. of the curved arrow inform you that truncation is in effect.
  643.  
  644.    To turn off continuation for a particular buffer, set the variable
  645. `truncate-lines' to non-`nil' in that buffer.  Truncation instead of
  646. continuation also happens whenever horizontal scrolling is in use, and
  647. optionally whenever side-by-side windows are in use (*note Windows::.).
  648. Altering the value of `truncate-lines' makes it local to the current
  649. buffer; until that time, the default value is in effect.  The default
  650. is initially `nil'.  *Note Locals::.
  651.  
  652. 
  653. File: xemacs.info,  Node: Position Info,  Next: Arguments,  Prev: Continuation Lines,  Up: Basic
  654.  
  655. Cursor Position Information
  656. ===========================
  657.  
  658.    If you are accustomed to other display editors, you may be surprised
  659. that Emacs does not always display the page number or line number of
  660. point in the mode line.  In Emacs, this information is only rarely
  661. needed, and a number of commands are available to compute and print it.
  662. Since text is stored in a way that makes it difficult to compute the
  663. information, it is not displayed all the time.
  664.  
  665. `M-x what-page'
  666.      Print page number of point, and line number within page.
  667.  
  668. `M-x what-line'
  669.      Print line number of point in the buffer.
  670.  
  671. `M-='
  672.      Print number of lines and characters in the current region
  673.      (`count-lines-region').
  674.  
  675. `C-x ='
  676.      Print character code of character after point, character position
  677.      of point, and column of point (`what-cursor-position').
  678.  
  679.    There are several commands for printing line numbers:
  680.    * `M-x what-line' counts lines from the beginning of the file and
  681.      prints the line number point is on.  The first line of the file is
  682.      line number 1.  You can use these numbers as arguments to `M-x
  683.      goto-line'.
  684.  
  685.    * `M-x what-page' counts pages from the beginning of the file, and
  686.      counts lines within the page, printing both of them.  *Note
  687.      Pages::, for the command `C-x l', which counts the lines in the
  688.      current page.
  689.  
  690.    * `M-=' (`count-lines-region') prints the number of lines in the
  691.      region (*note Mark::.).
  692.  
  693.    The command `C-x =' (`what-cursor-position') provides information
  694. about point and about the column the cursor is in.  It prints a line in
  695. the echo area that looks like this:
  696.  
  697.      Char: x (0170)  point=65986 of 563027(12%)  column 44
  698.  
  699. (In fact, this is the output produced when point is before `column 44'
  700. in the example.)
  701.  
  702.    The two values after `Char:' describe the character following point,
  703. first by showing it and second by giving its octal character code.
  704.  
  705.    `point=' is followed by the position of point expressed as a
  706. character count.  The front of the buffer counts as position 1, one
  707. character later as 2, and so on.  The next, larger number is the total
  708. number of characters in the buffer.  Afterward in parentheses comes the
  709. position expressed as a percentage of the total size.
  710.  
  711.    `column' is followed by the horizontal position of point, in columns
  712. from the left edge of the window.
  713.  
  714.    If the buffer has been narrowed, making some of the text at the
  715. beginning and the end temporarily invisible, `C-x =' prints additional
  716. text describing the current visible range.  For example, it might say:
  717.  
  718.      Char: x (0170)  point=65986 of 563025(12%) <65102 - 68533>  column 44
  719.  
  720. where the two extra numbers give the smallest and largest character
  721. position that point is allowed to assume.  The characters between those
  722. two positions are the visible ones.  *Note Narrowing::.
  723.  
  724.    If point is at the end of the buffer (or the end of the visible
  725. part), `C-x =' omits any description of the character after point.  The
  726. output looks like
  727.  
  728.      point=563026 of 563025(100%)  column 0
  729.  
  730. 
  731. File: xemacs.info,  Node: Arguments,  Prev: Position Info,  Up: Basic
  732.  
  733. Numeric Arguments
  734. =================
  735.  
  736.    Any Emacs command can be given a "numeric argument".  Some commands
  737. interpret the argument as a repetition count.  For example, giving an
  738. argument of ten to the key `C-f' (the command `forward-char', move
  739. forward one character) moves forward ten characters.  With these
  740. commands, no argument is equivalent to an argument of one.  Negative
  741. arguments are allowed.  Often they tell a command to move or act
  742. backwards.
  743.  
  744.    If your keyboard has a <META> key (labelled with a diamond on
  745. Sun-type keyboards and labelled `Alt' on some other keyboards), the
  746. easiest way to specify a numeric argument is to type digits and/or a
  747. minus sign while holding down the <META> key.  For example,
  748.      M-5 C-n
  749.  
  750. moves down five lines.  The characters `Meta-1', `Meta-2', and so on,
  751. as well as `Meta--', do this because they are keys bound to commands
  752. (`digit-argument' and `negative-argument') that are defined to
  753. contribute to an argument for the next command.
  754.  
  755.    Another way of specifying an argument is to use the `C-u'
  756. (`universal-argument') command followed by the digits of the argument.
  757. With `C-u', you can type the argument digits without holding down shift
  758. keys.  To type a negative argument, start with a minus sign.  Just a
  759. minus sign normally means -1.  `C-u' works on all terminals.
  760.  
  761.    `C-u' followed by a character which is neither a digit nor a minus
  762. sign has the special meaning of "multiply by four".  It multiplies the
  763. argument for the next command by four.  `C-u' twice multiplies it by
  764. sixteen.  Thus, `C-u C-u C-f' moves forward sixteen characters.  This
  765. is a good way to move forward "fast", since it moves about 1/5 of a line
  766. in the usual size frame.  Other useful combinations are `C-u C-n', `C-u
  767. C-u C-n' (move down a good fraction of a frame), `C-u C-u C-o' (make "a
  768. lot" of blank lines), and `C-u C-k' (kill four lines).
  769.  
  770.    Some commands care only about whether there is an argument and not
  771. about its value.  For example, the command `M-q' (`fill-paragraph') with
  772. no argument fills text; with an argument, it justifies the text as well.
  773. (*Note Filling::, for more information on `M-q'.)  Just `C-u' is a
  774. handy way of providing an argument for such commands.
  775.  
  776.    Some commands use the value of the argument as a repeat count, but do
  777. something peculiar when there is no argument.  For example, the command
  778. `C-k' (`kill-line') with argument N kills N lines, including their
  779. terminating newlines.  But `C-k' with no argument is special: it kills
  780. the text up to the next newline, or, if point is right at the end of
  781. the line, it kills the newline itself.  Thus, two `C-k' commands with
  782. no arguments can kill a non-blank line, just like `C-k' with an
  783. argument of one.  (*Note Killing::, for more information on `C-k'.)
  784.  
  785.    A few commands treat a plain `C-u' differently from an ordinary
  786. argument.  A few others may treat an argument of just a minus sign
  787. differently from an argument of -1.  These unusual cases will be
  788. described when they come up; they are always to make the individual
  789. command more convenient to use.
  790.  
  791. 
  792. File: xemacs.info,  Node: Undo,  Next: Minibuffer,  Prev: Basic,  Up: Top
  793.  
  794. Undoing Changes
  795. ***************
  796.  
  797.    Emacs allows you to undo all changes you make to the text of a
  798. buffer, up to a certain amount of change (8000 characters).  Each
  799. buffer records changes individually, and the undo command always
  800. applies to the current buffer.  Usually each editing command makes a
  801. separate entry in the undo records, but some commands such as
  802. `query-replace' make many entries, and very simple commands such as
  803. self-inserting characters are often grouped to make undoing less
  804. tedious.
  805.  
  806. `C-x u'
  807.      Undo one batch of changes (usually, one command's worth) (`undo').
  808.  
  809. `C-_'
  810.      The same.
  811.  
  812.    The command `C-x u' or `C-_' allows you to undo changes.  The first
  813. time you give this command, it undoes the last change.  Point moves to
  814. the text affected by the undo, so you can see what was undone.
  815.  
  816.    Consecutive repetitions of the `C-_' or `C-x u' commands undo
  817. earlier and earlier changes, back to the limit of what has been
  818. recorded.  If all recorded changes have already been undone, the undo
  819. command prints an error message and does nothing.
  820.  
  821.    Any command other than an undo command breaks the sequence of undo
  822. commands.  Starting at this moment, the previous undo commands are
  823. considered ordinary changes that can themselves be undone.  Thus, you
  824. can redo changes you have undone by typing `C-f' or any other command
  825. that have no important effect, and then using more undo commands.
  826.  
  827.    If you notice that a buffer has been modified accidentally, the
  828. easiest way to recover is to type `C-_' repeatedly until the stars
  829. disappear from the front of the mode line.  When that happens, all the
  830. modifications you made have been canceled.  If you do not remember
  831. whether you changed the buffer deliberately, type `C-_' once. When you
  832. see Emacs undo the last change you made, you probably remember why you
  833. made it.  If the change was an accident, leave it undone.  If it was
  834. deliberate, redo the change as described in the preceding paragraph.
  835.  
  836.    Whenever an undo command makes the stars disappear from the mode
  837. line, the buffer contents is the same as it was when the file was last
  838. read in or saved.
  839.  
  840.    Not all buffers record undo information.  Buffers whose names start
  841. with spaces don't; these buffers are used internally by Emacs and its
  842. extensions to hold text that users don't normally look at or edit.
  843. Minibuffers, help buffers, and documentation buffers also don't record
  844. undo information.
  845.  
  846.    Emacs can remember at most 8000 or so characters of deleted or
  847. modified text in any one buffer for reinsertion by the undo command.
  848. There is also a limit on the number of individual insert, delete, or
  849. change actions that Emacs can remember.
  850.  
  851.    There are two keys to run the `undo' command, `C-x u' and `C-_',
  852. because on some keyboards, it is not obvious how to type `C-_'. `C-x u'
  853. is an alternative you can type in the same fashion on any terminal.
  854.  
  855. 
  856. File: xemacs.info,  Node: Minibuffer,  Next: M-x,  Prev: Undo,  Up: Top
  857.  
  858. The Minibuffer
  859. **************
  860.  
  861.    Emacs commands use the "minibuffer" to read arguments more
  862. complicated than a single number.  Minibuffer arguments can be file
  863. names, buffer names, Lisp function names, Emacs command names, Lisp
  864. expressions, and many other things, depending on the command reading the
  865. argument.  To edit the argument in the minibuffer, you can use Emacs
  866. editing commands.
  867.  
  868.    When the minibuffer is in use, it appears in the echo area, and the
  869. cursor moves there.  The beginning of the minibuffer line displays a
  870. "prompt" indicating what kind of input you should supply and how it
  871. will be used.  The prompt is often derived from the name of the command
  872. the argument is for.  The prompt normally ends with a colon.
  873.  
  874.    Sometimes a "default argument" appears in parentheses after the
  875. colon; it, too, is part of the prompt.  The default is used as the
  876. argument value if you enter an empty argument (e.g., by just typing
  877. <RET>).  For example, commands that read buffer names always show a
  878. default, which is the name of the buffer that will be used if you type
  879. just <RET>.
  880.  
  881.    The simplest way to give a minibuffer argument is to type the text
  882. you want, terminated by <RET> to exit the minibuffer.  To get out of
  883. the minibuffer and cancel the command that it was for, type `C-g'.
  884.  
  885.    Since the minibuffer uses the screen space of the echo area, it can
  886. conflict with other ways Emacs customarily uses the echo area.  Here is
  887. how Emacs handles such conflicts:
  888.  
  889.    * If a command gets an error while you are in the minibuffer, this
  890.      does not cancel the minibuffer.  However, the echo area is needed
  891.      for the error message and therefore the minibuffer itself is
  892.      hidden for a while.  It comes back after a few seconds, or as soon
  893.      as you type anything.
  894.  
  895.    * If you use a command in the minibuffer whose purpose is to print a
  896.      message in the echo area (for example `C-x =') the message is
  897.      displayed normally, and the minibuffer is hidden for a while.  It
  898.      comes back after a few seconds, or as soon as you type anything.
  899.  
  900.    * Echoing of keystrokes does not take place while the minibuffer is
  901.      in use.
  902.  
  903. * Menu:
  904.  
  905. * File: Minibuffer File.  Entering file names with the minibuffer.
  906. * Edit: Minibuffer Edit.  How to edit in the minibuffer.
  907. * Completion::          An abbreviation facility for minibuffer input.
  908. * Repetition::          Re-executing commands that used the minibuffer.
  909.  
  910. 
  911. File: xemacs.info,  Node: Minibuffer File,  Next: Minibuffer Edit,  Prev: Minibuffer,  Up: Minibuffer
  912.  
  913. Minibuffers for File Names
  914. ==========================
  915.  
  916.    Sometimes the minibuffer starts out with text in it.  For example,
  917. when you are supposed to give a file name, the minibuffer starts out
  918. containing the "default directory", which ends with a slash.  This
  919. informs you in which directory the file will be looked for if you do
  920. not specify a different one. For example, the minibuffer might start
  921. out with:
  922.  
  923.      Find File: /u2/emacs/src/
  924.  
  925. where `Find File: ' is the prompt.  Typing `buffer.c' specifies the file
  926. `/u2/emacs/src/buffer.c'.  To find files in nearby directories, use
  927. `..'; thus, if you type `../lisp/simple.el', the file that you visit
  928. will be the one named
  929. `/u2/emacs/lisp/simple.el'.  Alternatively, you can use  `M-<DEL>' to
  930. kill directory names you don't want (*note Words::.).
  931.  
  932.    You can also type an absolute file name, one starting with a slash
  933. or a tilde, ignoring the default directory.  For example, to find the
  934. file `/etc/termcap', just type the name, giving:
  935.  
  936.      Find File: /u2/emacs/src//etc/termcap
  937.  
  938. Two slashes in a row are not normally meaningful in Unix file names, but
  939. they are allowed in XEmacs.  They mean, "ignore everything before the
  940. second slash in the pair."  Thus, `/u2/emacs/src/' is ignored, and you
  941. get the file `/etc/termcap'.
  942.  
  943.    If you set `insert-default-directory' to `nil', the default
  944. directory is not inserted in the minibuffer.  This way, the minibuffer
  945. starts out empty.  But the name you type, if relative, is still
  946. interpreted with respect to the same default directory.
  947.  
  948. 
  949. File: xemacs.info,  Node: Minibuffer Edit,  Next: Completion,  Prev: Minibuffer File,  Up: Minibuffer
  950.  
  951. Editing in the Minibuffer
  952. =========================
  953.  
  954.    The minibuffer is an Emacs buffer (albeit a peculiar one), and the
  955. usual Emacs commands are available for editing the text of an argument
  956. you are entering.
  957.  
  958.    Since <RET> in the minibuffer is defined to exit the minibuffer, you
  959. must use `C-o' or `C-q <LFD>' to insert a newline into the minibuffer.
  960. (Recall that a newline is really the <LFD> character.)
  961.  
  962.    The minibuffer has its own window, which always has space on the
  963. screen but acts as if it were not there when the minibuffer is not in
  964. use.  The minibuffer window is just like the others; you can switch to
  965. another window with `C-x o', edit text in other windows, and perhaps
  966. even visit more files before returning to the minibuffer to submit the
  967. argument.  You can kill text in another window, return to the minibuffer
  968. window, and then yank the text to use it in the argument.  *Note
  969. Windows::.
  970.  
  971.    There are, however, some restrictions on the use of the minibuffer
  972. window.  You cannot switch buffers in it--the minibuffer and its window
  973. are permanently attached.  You also cannot split or kill the minibuffer
  974. window, but you can make it taller with `C-x ^'.
  975.  
  976.    If you are in the minibuffer and issue a command that displays help
  977. text in another window, that window will be scrolled if you type
  978. `M-C-v' while in the minibuffer until you exit the minibuffer.  This
  979. feature is helpful if a completing minibuffer gives you a long list of
  980. possible completions.
  981.  
  982.    If the variable `minibuffer-confirm-incomplete' is `t', you are
  983. asked for confirmation if there is no known completion for the text you
  984. typed. For example, if you attempted to visit a non-existent file, the
  985. minibuffer might read:
  986.              Find File:chocolate_bar.c [no completions, confirm]
  987.    If you press `Return' again, that confirms the filename. Otherwise,
  988. you can continue editing it.
  989.  
  990.    Emacs supports recursive use of the minibuffer.  However, it is easy
  991. to do this by accident (because of autorepeating keyboards, for
  992. example) and get confused.  Therefore, most Emacs commands that use the
  993. minibuffer refuse to operate if the minibuffer window is selected.  If
  994. the minibuffer is active but you have switched to a different window,
  995. recursive use of the minibuffer is allowed--if you know enough to try
  996. to do this, you probably will not get confused.
  997.  
  998.    If you set the variable `enable-recursive-minibuffers' to be
  999. non-`nil', recursive use of the minibuffer is always allowed.
  1000.  
  1001. 
  1002. File: xemacs.info,  Node: Completion,  Next: Repetition,  Prev: Minibuffer Edit,  Up: Minibuffer
  1003.  
  1004. Completion
  1005. ==========
  1006.  
  1007.    When appropriate, the minibuffer provides a "completion" facility.
  1008. You type the beginning of an argument and one of the completion keys,
  1009. and Emacs visibly fills in the rest, depending on what you have already
  1010. typed.
  1011.  
  1012.    When completion is available, certain keys--<TAB>, <RET>, and
  1013. <SPC>--are redefined to complete an abbreviation present in the
  1014. minibuffer into a longer string that it stands for, by matching it
  1015. against a set of "completion alternatives" provided by the command
  1016. reading the argument.  `?' is defined to display a list of possible
  1017. completions of what you have inserted.
  1018.  
  1019.    For example, when the minibuffer is being used by `Meta-x' to read
  1020. the name of a command, it is given a list of all available Emacs command
  1021. names to complete against.  The completion keys match the text in the
  1022. minibuffer against all the command names, find any additional
  1023. characters of the name that are implied by the ones already present in
  1024. the minibuffer, and add those characters to the ones you have given.
  1025.  
  1026.    Case is normally significant in completion because it is significant
  1027. in most of the names that you can complete (buffer names, file names,
  1028. and command names).  Thus, `fo' will not complete to `Foo'.  When you
  1029. are completing a name in which case does not matter, case may be ignored
  1030. for completion's sake if specified by program.
  1031.  
  1032.    When a completion list is displayed, the completions will highlight
  1033. as you move the mouse over them.  Clicking the middle mouse button on
  1034. any highlighted completion will "select" it just as if you had typed it
  1035. in and hit <RET>.
  1036.  
  1037. A Completion Example
  1038. --------------------
  1039.  
  1040.    Consider the following example.  If you type `Meta-x au <TAB>',
  1041. <TAB> looks for alternatives (in this case, command names) that start
  1042. with `au'.  There are only two commands: `auto-fill-mode' and
  1043. `auto-save-mode'.  They are the same as far as `auto-', so the `au' in
  1044. the minibuffer changes to `auto-'.
  1045.  
  1046.    If you type <TAB> again immediately, there are multiple possibilities
  1047. for the very next character--it could be `s' or `f'--so no more
  1048. characters are added; but a list of all possible completions is
  1049. displayed in another window.
  1050.  
  1051.    If you go on to type `f <TAB>', this <TAB> sees `auto-f'.  The only
  1052. command name starting this way is `auto-fill-mode', so completion
  1053. inserts the rest of that command.  You now have `auto-fill-mode' in the
  1054. minibuffer after typing just `au <TAB> f <TAB>'.  Note that <TAB> has
  1055. this effect because in the minibuffer it is bound to the function
  1056. `minibuffer-complete' when completion is supposed to be done.
  1057.  
  1058. Completion Commands
  1059. -------------------
  1060.  
  1061.    Here is a list of all the completion commands defined in the
  1062. minibuffer when completion is available.
  1063.  
  1064. `<TAB>'
  1065.      Complete the text in the minibuffer as much as possible
  1066.      (`minibuffer-complete').
  1067.  
  1068. `<SPC>'
  1069.      Complete the text in the minibuffer but don't add or fill out more
  1070.      than one word (`minibuffer-complete-word').
  1071.  
  1072. `<RET>'
  1073.      Submit the text in the minibuffer as the argument, possibly
  1074.      completing first as described below
  1075.      (`minibuffer-complete-and-exit').
  1076.  
  1077. `?'
  1078.      Print a list of all possible completions of the text in the
  1079.      minibuffer (`minibuffer-list-completions').
  1080.  
  1081. `<button2>'
  1082.      Select the highlighted text under the mouse as a minibuffer
  1083.      response.  When the minibuffer is being used to prompt the user
  1084.      for a completion, any valid completions which are visible on the
  1085.      screen will be highlighted when the mouse moves over them.
  1086.      Clicking <button2> will select the highlighted completion and exit
  1087.      the minibuffer.  (`minibuf-select-highlighted-completion').
  1088.  
  1089.    <SPC> completes in a way that is similar to <TAB>, but it never goes
  1090. beyond the next hyphen or space.  If you have `auto-f' in the
  1091. minibuffer and type <SPC>, it finds that the completion is
  1092. `auto-fill-mode', but it stops completing after `fill-'.  The result is
  1093. `auto-fill-'. Another <SPC> at this point completes all the way to
  1094. `auto-fill-mode'.  <SPC> in the minibuffer runs the function
  1095. `minibuffer-complete-word' when completion is available.
  1096.  
  1097.    There are three different ways that <RET> can work in completing
  1098. minibuffers, depending on how the argument will be used.
  1099.  
  1100.    * "Strict" completion is used when it is meaningless to give any
  1101.      argument except one of the known alternatives.  For example, when
  1102.      `C-x k' reads the name of a buffer to kill, it is meaningless to
  1103.      give anything but the name of an existing buffer.  In strict
  1104.      completion, <RET> refuses to exit if the text in the minibuffer
  1105.      does not complete to an exact match.
  1106.  
  1107.    * "Cautious" completion is similar to strict completion, except that
  1108.      <RET> exits only if the text was an exact match already, not
  1109.      needing completion.  If the text is not an exact match, <RET> does
  1110.      not exit, but it does complete the text.  If it completes to an
  1111.      exact match, a second <RET> will exit.
  1112.  
  1113.      Cautious completion is used for reading file names for files that
  1114.      must already exist.
  1115.  
  1116.    * "Permissive" completion is used when any string is meaningful, and
  1117.      the list of completion alternatives is just a guide.  For example,
  1118.      when `C-x C-f' reads the name of a file to visit, any file name is
  1119.      allowed, in case you want to create a file.  In permissive
  1120.      completion, <RET> takes the text in the minibuffer exactly as
  1121.      given, without completing it.
  1122.  
  1123.    The completion commands display a list of all possible completions
  1124. in a window whenever there is more than one possibility for the very
  1125. next character.  Typing `?' explicitly requests such a list.  The list
  1126. of completions counts as help text, so `C-M-v' typed in the minibuffer
  1127. scrolls the list.
  1128.  
  1129.    When completion is done on file names, certain file names are usually
  1130. ignored.  The variable `completion-ignored-extensions' contains a list
  1131. of strings; a file whose name ends in any of those strings is ignored
  1132. as a possible completion.  The standard value of this variable has
  1133. several elements including `".o"', `".elc"', `".dvi"' and `"~"'.  The
  1134. effect is that, for example, `foo' completes to `foo.c' even though
  1135. `foo.o' exists as well.  If the only possible completions are files
  1136. that end in "ignored" strings, they are not ignored.
  1137.  
  1138.    If a completion command finds the next character is undetermined, it
  1139. automatically displays a list of all possible completions.  If the
  1140. variable `completion-auto-help' is set to `nil', this does not happen,
  1141. and you must type `?' to display the possible completions.
  1142.  
  1143.    If the variable `minibuffer-confirm-incomplete' is set to `t', then
  1144. in contexts where `completing-read' allows answers that are not valid
  1145. completions, an extra <RET> must be typed to confirm the response.
  1146. This is helpful for catching typos.
  1147.  
  1148. 
  1149. File: xemacs.info,  Node: Repetition,  Prev: Completion,  Up: Minibuffer
  1150.  
  1151. Repeating Minibuffer Commands
  1152. =============================
  1153.  
  1154.    Every command that uses the minibuffer at least once is recorded on a
  1155. special history list, together with the values of the minibuffer
  1156. arguments, so that you can repeat the command easily.  In particular,
  1157. every use of `Meta-x' is recorded, since `M-x' uses the minibuffer to
  1158. read the command name.
  1159.  
  1160. `C-x <ESC>'
  1161.      Re-execute a recent minibuffer command
  1162.      (`repeat-complex-command').
  1163.  
  1164. `M-p'
  1165.      Within `C-x <ESC>', move to previous recorded command
  1166.      (`previous-history-element').
  1167.  
  1168. `M-n'
  1169.      Within `C-x <ESC>', move to the next (more recent) recorded
  1170.      command (`next-history-element').
  1171.  
  1172. `M-x list-command-history'
  1173.      Display the entire command history, showing all the commands `C-x
  1174.      <ESC>' can repeat, most recent first.
  1175.  
  1176.    `C-x <ESC>' is used to re-execute a recent command that used the
  1177. minibuffer. With no argument, it repeats the last command.  A numeric
  1178. argument specifies which command to repeat; 1 means the last one, and
  1179. larger numbers specify earlier commands.
  1180.  
  1181.    `C-x <ESC>' works by turning the previous command into a Lisp
  1182. expression and then entering a minibuffer initialized with the text for
  1183. that expression.  If you type just <RET>, the command is repeated as
  1184. before.  You can also change the command by editing the Lisp expression.
  1185. The expression you finally submit will be executed.  The repeated
  1186. command is added to the front of the command history unless it is
  1187. identical to the most recently executed command already there.
  1188.  
  1189.    Even if you don't understand Lisp syntax, it will probably be obvious
  1190. which command is displayed for repetition.  If you do not change the
  1191. text, you can be sure the command will repeat exactly as before.
  1192.  
  1193.    If you are in the minibuffer for `C-x <ESC>' and the command shown
  1194. to you is not the one you want to repeat, you can move around the list
  1195. of previous commands using `M-n' and `M-p'.  `M-p' replaces the
  1196. contents of the minibuffer with the next earlier recorded command, and
  1197. `M-n' replaces it with the next later command.  After finding the
  1198. desired previous command, you can edit its expression and then resubmit
  1199. it by typing <RET>.  Any editing you have done on the command to be
  1200. repeated is lost if you use `M-n' or `M-p'.
  1201.  
  1202.    `M-n' and `M-p' are specially defined within `C-x <ESC>' to run the
  1203. commands `previous-history-element' and `next-history-element'.
  1204.  
  1205.    The list of previous commands using the minibuffer is stored as a
  1206. Lisp list in the variable `command-history'.  Each element of the list
  1207. is a Lisp expression which describes one command and its arguments.
  1208. Lisp programs can reexecute a command by feeding the corresponding
  1209. `command-history' element to `eval'.
  1210.  
  1211.